How to make ping work on or1ksim
by fabid on Jun 16, 2009 |
fabid
Posts: 2 Joined: Sep 20, 2008 Last seen: May 15, 2023 |
||
Hi,
I compiled uClinux and or1ksim . Basic unix commands like "ls" and "cd" work. But networking commands don't work. The /etc/rc executes Command: ifconfig eth0 inet 10.1.1.200 netmask 255.0.0.0 hw ether 00:01:02:03:04:05 Command: route add -net 10.0.0.0 netmask 255.0.0.0 dev eth0 when booting up the system. I don't see error messsage for these two commands. After that, if I do "ifconfig" to confirm network configuration, I get /proc/net/dev: No such file or directory If I do "route", I get /proc/net/route: No such file or directory INET (IPv4) not configured in this system. If I do "ping 192.168.0.1", I get PING 192.168.0.1 (192.168.0.1): 56 data bytes ping: sendto: Network is unreachable ping: wrote 192.168.0.1 64 chars, ret=-1 ping: sendto: Network is unreachable Can anybody tell me how to fix the problem? I don't see directory /proc, should I add that directory to make networking commands work? |
RE: How to make ping work on or1ksim
by jeremybennett on Jul 8, 2009 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
Hi Fabid, Only just seen your post - I don't watch the Ethernet forum. You might be better posting questions like this (about how Ethernet works with OR1K) on the OpenRISC forum. There are two possible sources of the problem: 1) Or1ksim, 2) the Linux port. I've done no testing of the Or1ksim Ethernet implementation, so I don't know how well it works. However there is no record suggesting that it is broken. Have you set up your Or1ksim config file for Ethernet correctly. I think by default it just writes Ethernet data to a file and reads data from a file. Assuming you have this set correctly, this looks to me more like a problem with the Linux use of the Ethernet interface. Have you built Linux with the Ethernet device drivers included. My standard instructions (www.embecosm.com/download/ean1.html) suggest disabling it, since in old versions of Linux for OR1K it could cause problems. For more detail, you could also try using a cycle accurate model, but that would require you to port the device driver to drive the pins on the model. There are instructions on how to build this on the OpenRISC 1000 ORPSoC page or in Embecosm Application Note 6 (www.embecosm.com/download/ean6.html). I suggest posting your question to the OpenRISC forum. There are others there who know far more than me about the Linux port (Rich D'Addio in particular). HTH,
-- |